package test;

import com.nkzy.Pojo.category;
import com.nkzy.mapper.categorymapper;
import org.junit.jupiter.api.Test;

import java.util.List;

import static org.junit.jupiter.api.Assertions.*;

public class categorytest {
   @Test
    public void insertCategory()
    {
        category category = new category();
        category.setName("测试");
        category.setDescription("测试");
        categorymapper categorymapper = new categorymapper() {
            @Override
            public int insertCategory(com.nkzy.Pojo.category category) {
                return 0;
            }

            @Override
            public int updateCategory(com.nkzy.Pojo.category category) {
                return 0;
            }

            @Override
            public int deleteCategoryById(Integer id) {
                return 0;
            }

            @Override
            public com.nkzy.Pojo.category selectCategoryById(Integer id) {
                return null;
            }

            @Override
            public List<com.nkzy.Pojo.category> selectAllCategories() {
                return List.of();
            }

            @Override
            public List<com.nkzy.Pojo.category> selectCategoriesByName(String name) {
                return List.of();
            }

            @Override
            public List<com.nkzy.Pojo.category> selectCategoriesByDescription(String description) {
                return List.of();
            }
        };
    }
    @Test
    public void selectCategoryById()
    {
        categorymapper categorymapper = new categorymapper() {
            @Override
            public int insertCategory(category category) {
                return 0;
            }

            @Override
            public int updateCategory(category category) {
                return 0;
            }

            @Override
            public int deleteCategoryById(Integer id) {
                return 0;
            }

            @Override
            public category selectCategoryById(Integer id) {
                return null;
            }

            @Override
            public List<category> selectAllCategories() {
                return List.of();
            }

            @Override
            public List<category> selectCategoriesByName(String name) {
                return List.of();
            }

            @Override
            public List<category> selectCategoriesByDescription(String description) {
                return List.of();
            }
        };
    }
    @Test
    public void updateCategory()
    {
        categorymapper categorymapper = new categorymapper() {
            @Override
            public int insertCategory(category category) {
                return 0;
            }

            @Override
            public int updateCategory(category category) {
                return 0;
            }

            @Override
            public int deleteCategoryById(Integer id) {
                return 0;
            }

            @Override
            public category selectCategoryById(Integer id) {
                return null;
            }

            @Override
            public List<category> selectAllCategories() {
                return List.of();
            }

            @Override
            public List<category> selectCategoriesByName(String name) {
                return List.of();
            }

            @Override
            public List<category> selectCategoriesByDescription(String description) {
                return List.of();
            }
        };
    }
}
